<template>
<div>
    {{ counts }}
    <p>
    <button @click="increment">+</button>
    <button @click="decrement">-</button>
    </p>
        
</div>
  
</template>
<script>
    export default{
        name:'sildebar',
        data(){
            return{

            }
        },
        methods:{
            increment(){
              this.$store.commit('increment')
            },
            decrement(){
              this.$store.commit('decrement')
            }
        },
        computed:{
            counts(){
                return this.$store.state.count
            },
        }


    }

</script>